package zust.javaee.service;

import zust.javaee.dto.AjaxReturn;
import zust.javaee.dto.SessionInfo;
import zust.javaee.dto.admin.*;
import zust.javaee.dto.adminadd.CorporationAddDto;
import zust.javaee.dto.adminadd.PlayerAddDto;
import zust.javaee.entity.Tcorporation;
import zust.javaee.entity.Tplayer;

import javax.servlet.http.HttpSession;
import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;
import java.util.List;

/**
 * Created by liy on 2017/1/8.
 */
public interface AdminServive extends BaseService<Tplayer> {

    AjaxReturn<SessionInfo> doLogin(String sId, String password, HttpSession session);
    void addPlayer(PlayerAddDto playerAddDto);
    void updatePlayer(Integer playerId, PlayerAddDto playerAddDto);
    void updateCorporation(Integer corporId, CorporationAddDto corporationAddDto);

    boolean changePlayerStatu(Integer playerId, Short statu);
    boolean changeSigncorporStatu(Integer id, Short statu);
    boolean changeCorporationStatu(Integer id, Short statu);
    boolean changeActivityStatu(Integer id, Short statu);
    boolean changeAnnouncementStatu(Integer id, Short statu);

    boolean passSignCorpor(Integer signCorporId);

    Long getPlayerNum();
    Long getCorporationNum();


    /**
     * player list
     * @param status
     * @param page
     * @param rows
     * @param keywd
     * @param sort
     * @return
     */
    List<PlayerListDto> getPlayerIndexList(Short status, Integer page, Integer rows, String keywd, String sort);
    long getPlayerPageNum(short status, Integer page, Integer rows, String keywd, String sort);
    long getPlayerNum(short status, String keywd);

    List<PlayerListDto> getPlayerIndexList(Short status);
    List<PlayerListDto> getPlayerIndexListExcept(Short status);
    List<CorporListDto> getCorporIndexList(Short status);
    List<CorporListDto> getCorporIndexListExcept(Short status);
    List<ActivityListDto> getActivityIndexList(Short status);
    List<ActivityListDto> getActivityIndexListLess(Short status);
    List<SignCorporListDto> getSignCorporIndexList(Short status);
    List<AnnouncementListDto> getAnnouncementIndexList(Short status);

    Tcorporation getCloseTimeCorporation();


}
